package com.websem.server;

import fr.inria.edelweiss.kgraph.core.Graph;
import fr.inria.edelweiss.kgraph.query.QueryProcess;
import fr.inria.edelweiss.kgtool.load.Load;

/**
 * @author haifa
 * 
 */
public class WebSemanticService {

	private Graph graph;
	private QueryProcess exec;

	public WebSemanticService() {
		graph = Graph.create(true);
		Load ld = Load.create(graph);
		ld.load("resources/cinema.rdf");
		ld.load("resources/cinema.rdfs");
		exec = QueryProcess.create(graph);
	}

	public WebSemanticService(String rdfPath, String rdfsPath) {
		graph = Graph.create(true);
		Load ld = Load.create(graph);
		ld.load(rdfPath);
		ld.load(rdfsPath);
		exec = QueryProcess.create(graph);
	}

	public Graph getGraph() {
		return graph;
	}

	public QueryProcess getExec() {
		return exec;
	}

	static WebSemanticService getInstance() {
		return new WebSemanticService();

	}

}
